using TechTalk.SpecFlow;
using TechTalk.SpecFlow.Assist;

namespace Baula.TextGen.ActiveTemplating.Specs.StepDefinitions
{
    [Binding]
    public class AccessObjectsStepDefinitions
    {
        [Given(@"the current database contains the following forms")]
        public void GivenTheCurrentDatabaseContainsTheFollowingForms(Table table)
        {
            var formsContext = new FormsContext(table.CreateSet<FormInfo>());
            ScenarioContext.Current.Set(formsContext);
        }

        [Given(@"I have the following custom tables in my database")]
        public void GivenIHaveTheFollowingCustomTablesInMyDatabase(Table table)
        {
            var tablesContext = new TablesContext(table.CreateSet<TableInfo>());
            ScenarioContext.Current.Set(tablesContext);
        }

        [Given(@"I have the following custom tables with their fields in my database")]
        public void GivenIHaveTheFollowingCustomTablesWithTheirFieldsInMyDatabase(Table table)
        {
            var tablesContext = new TablesContext(table.CreateSet<TableInfo>());
            ScenarioContext.Current.Set(tablesContext);
        }
    }
}